home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / infop125.zip / PAGE_02.INC < prev    next >
Text File  |  1990-08-10  |  2KB  |  86 lines

  1. procedure page_02;
  2.  
  3. var
  4.   cpu_info: cpu_info_t;
  5.   save_cpu_type: byte;
  6.  
  7. procedure showNDP(a: string; b: word);
  8.   begin
  9.   writeln(a);
  10.   caption2('  Infinity');
  11.   case b and $1000 of
  12.     $0000 : writeln('projective');
  13.     $1000 : writeln('affine')
  14.   end;
  15.   caption2('  Rounding');
  16.   case b and $0C00 of
  17.     $0000 : writeln('to nearest or even');
  18.     $0400 : writeln('down');
  19.     $0800 : writeln('up');
  20.     $0C00 : writeln('chop')
  21.   end;
  22.   caption2('  Precision');
  23.   case b and $0300 of
  24.     $0000 : writeln('24 bits');
  25.     $0100 : writeln('(reserved)');
  26.     $0200 : writeln('53 bits');
  27.     $0300 : writeln('64 bits')
  28.   end
  29.   end; {showNDP}
  30.  
  31.   begin (* procedure page_02 *)
  32.   caption2('CPU');
  33.   cpu_info.test_type:='C';
  34.   CPUID(cpu_info);
  35.   with cpu_info do begin
  36.     case cpu_type of
  37.       $00 : writeln('8088');
  38.       $01 : writeln('8086');
  39.       $02 : writeln('V20');
  40.       $03 : writeln('V30');
  41.       $04 : writeln('80188');
  42.       $05 : writeln('80186');
  43.       $06 : writeln('80286');
  44.       $07 : writeln('80386');
  45.       $08 : Writeln('80486')
  46.       else
  47.         unknown('CPU', cpu_type, 2)
  48.     end;
  49.     save_cpu_type:=cpu_type;
  50.     case cpu_type of
  51.       $06..$08 : begin
  52.                  caption3('Machine State Word');
  53.                  writeln(hex(MSW, 4));
  54.                  caption3('Global Descriptor Table   ');
  55.                  for i:=1 to 6 do
  56.                    write(hex(GDT[i], 2), ' ');
  57.                  writeln;
  58.                  caption3('Interrupt Descriptor Table');
  59.                  for i:=1 to 6 do
  60.                    write(hex(IDT[i], 2), ' ');
  61.                  writeln
  62.                  end
  63.     end;
  64.     caption3('Interrupts acknowledged immediately after segment register change');
  65.     yesorno(intflag);
  66.     caption2('Coprocessor');
  67.     if save_cpu_type = $08 then
  68.       showNDP('80486', ndp_cw) {'486 has coprocessor built in}
  69.     else
  70.       begin
  71.       test_type:='N';
  72.       CPUID(cpu_info);
  73.       case ndp_type of
  74.         $00 : writeln('none');
  75.         $01 : showNDP('8087', ndp_cw);
  76.         $02 : showNDP('80287', ndp_cw);
  77.         $03 : showNDP('80387', ndp_cw)
  78.       else
  79.         unknown('coprocessor', ndp_type, 4)
  80.       end {case}
  81.       end
  82.   end;
  83.   caption2('BIOS coprocessor flag set');
  84.   yesorno(equip and $0002 = $0002)
  85.   end;
  86.